package com.fengye.kafka;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class KafkaDemoApplication {

    public static void main(String[] args) {
        SpringApplicationBuilder builder = new SpringApplicationBuilder(KafkaDemoApplication.class);
        SpringApplication springApplication = builder.web(WebApplicationType.NONE)
                .build();
        springApplication.run(args);
        // ConfigurableApplicationContext context = SpringApplication.run(KafkaDemoApplication.class, args);
        //
        // Environment environment = context.getEnvironment();
        // String port = environment.getProperty("local.server.port");
        // System.out.println("Server started on port: " + port);
    }

}
